<template>
    <view>
        <view>
            <form @submit="formSubmit" @reset="formReset" v-model="Rise">
                <view class="uni-tt" >
                    <view class="title">默认抬头:</view>
                    <view>
                        <switch name="switch" class="swiths" />
                    </view>
                </view>
                
               
                <view class="uni-tt">
                    <view class="title">名称:</view>
					<view>
                    <input class="uni-input" name="input" placeholder="请输入名称" v-model="merchantsIdso.merchantsName"/>
					</view>
                </view>
				
				<view class="uni-tt">
				    <view class="title">税号:</view>
					<view>
				    <input class="uni-input" name="input" placeholder="非必填" />
					</view>
				</view>
				
				<view class="uni-tt">
				    <view class="title">企业地址:</view>
					<view>
				    <input class="uni-input" name="input" placeholder="非必填" />
					</view>
				</view>
				
				<view class="uni-tt">
				    <view class="title">企业电话:</view>
					<view>
				    <input class="uni-input" name="input" placeholder="非必填" />
					</view>
				</view>
				
				<view class="uni-tt">
				    <view class="title">开户银行:</view>
					<view>
				    <input class="uni-input" name="input" placeholder="非必填" />
					</view>
				</view>
				
				<view class="uni-tt">
				    <view class="title">开户账号:</view>
					<view>
				    <input class="uni-input" name="input" placeholder="非必填" />
					</view>
				</view>
				
		
                <view class="uni-btn-v">
                    <button form-type="submit" @tap="keyword">提交</button>
                    <button type="default" form-type="reset">删除</button>
                </view>
				
            </form>
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
				merchantsIds:'',
				merchantsIdso:{
					merchantsName:''
				}
				
            }
        },
		onLoad(data) {
			var me =this;
			me.merchantsIds =data.merchantsId
			me.detail()
		},
        methods: {
			detail(data){
				var me = this;
				console.log(me.merchantsId);
				uni.request({
					url:me.$ServerUrl+'/fp/api/yxkCustomer/getSjById',  //通过ID获取商家
					data:{
						id:me.merchantsIds
					},
					header: {
						'content-type': 'application/x-www-form-urlencoded' // 默认值JSON格式
					},
					method: "GET",
					success(res) {
						console.log(res)
						console.log("------")
						console.log(res.data.merchantsName)
						console.log(me.merchantsIds)
						console.log("------");
						me.merchantsIdso = res.data;
						console.log(me.merchantsIdso);
						
					}
				})		
			},
			

        }
    }
</script>

<style>
    .uni-form-item .title {
        padding: 20rpx 0;
    }
	.uni-tt{
		display: flex;
		padding: 10px;
		border-style: groove;
		
	}
	.uni-input{
		padding-left: 10px;
	}
	.swiths{
		padding-left: 20px;
	}
	.uni-btn-v{
		
		
	}
</style>